Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweaking the patch to only affect socket shutdown and close. Ref: #242

  • Loading branch information...
commit c627b7214bf244ddb0ca4d6d5c7f5e41e63c6722 1 parent 95da7f3
@vishnugopal authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 ext/ed.cpp
View
11 ext/ed.cpp
@@ -174,10 +174,15 @@ void EventableDescriptor::Close()
*/
// Close the socket right now. Intended for emergencies.
- if (MySocket != INVALID_SOCKET && MySocket > 2 && !bWatchOnly) {
+ if (MySocket != INVALID_SOCKET && !bWatchOnly) {

remove !bWatchOnly from here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
MyEventMachine->Closing (this);
- shutdown (MySocket, 1);
- close (MySocket);
+
+ // Do not close STDIN, STDOUT, STDERR
+ if (MySocket > 2) {

and add !bWatchOnly to here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ shutdown (MySocket, 1);
+ close (MySocket);
+ }
+
MySocket = INVALID_SOCKET;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.