Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b9fd34a9
Commit
b9fd34a9
authored
May 18, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#28443
review comment if some tcp-transporter has data, then do select with timeout 0
parent
b26bbbb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
ndb/src/common/transporter/TransporterRegistry.cpp
ndb/src/common/transporter/TransporterRegistry.cpp
+18
-16
No files found.
ndb/src/common/transporter/TransporterRegistry.cpp
View file @
b9fd34a9
...
@@ -814,22 +814,6 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
...
@@ -814,22 +814,6 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
return
0
;
return
0
;
}
}
struct
timeval
timeout
;
#ifdef NDB_OSE
// Return directly if there are no TCP transporters configured
if
(
timeOutMillis
<=
1
){
timeout
.
tv_sec
=
0
;
timeout
.
tv_usec
=
1025
;
}
else
{
timeout
.
tv_sec
=
timeOutMillis
/
1000
;
timeout
.
tv_usec
=
(
timeOutMillis
%
1000
)
*
1000
;
}
#else
timeout
.
tv_sec
=
timeOutMillis
/
1000
;
timeout
.
tv_usec
=
(
timeOutMillis
%
1000
)
*
1000
;
#endif
NDB_SOCKET_TYPE
maxSocketValue
=
-
1
;
NDB_SOCKET_TYPE
maxSocketValue
=
-
1
;
// Needed for TCP/IP connections
// Needed for TCP/IP connections
...
@@ -855,6 +839,24 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
...
@@ -855,6 +839,24 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
hasdata
|=
t
->
hasReceiveData
();
hasdata
|=
t
->
hasReceiveData
();
}
}
timeOutMillis
=
hasdata
?
0
:
timeOutMillis
;
struct
timeval
timeout
;
#ifdef NDB_OSE
// Return directly if there are no TCP transporters configured
if
(
timeOutMillis
<=
1
){
timeout
.
tv_sec
=
0
;
timeout
.
tv_usec
=
1025
;
}
else
{
timeout
.
tv_sec
=
timeOutMillis
/
1000
;
timeout
.
tv_usec
=
(
timeOutMillis
%
1000
)
*
1000
;
}
#else
timeout
.
tv_sec
=
timeOutMillis
/
1000
;
timeout
.
tv_usec
=
(
timeOutMillis
%
1000
)
*
1000
;
#endif
// The highest socket value plus one
// The highest socket value plus one
maxSocketValue
++
;
maxSocketValue
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment