Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
39137559
Commit
39137559
authored
Apr 03, 2017
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some small changes to PR #200
parent
963259de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Socket.c
src/Socket.c
+6
-5
No files found.
src/Socket.c
View file @
39137559
/*******************************************************************************
* Copyright (c) 2009, 201
6
IBM Corp.
* Copyright (c) 2009, 201
7
IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
...
...
@@ -14,6 +14,7 @@
* Ian Craggs - initial implementation and documentation
* Ian Craggs - async client updates
* Ian Craggs - fix for bug 484496
* Juergen Kosel, Ian Craggs - fix for issue #135
*******************************************************************************/
/**
...
...
@@ -619,7 +620,7 @@ int Socket_new(char* addr, int port, int* sock)
struct
addrinfo
*
res
=
result
;
while
(
res
)
{
/* prefer ip4 addresses */
{
/* prefer ip4 addresses */
if
(
res
->
ai_family
==
AF_INET
||
res
->
ai_next
==
NULL
)
break
;
res
=
res
->
ai_next
;
...
...
@@ -693,10 +694,10 @@ int Socket_new(char* addr, int port, int* sock)
* as reported in
* https://github.com/eclipse/paho.mqtt.c/issues/135
*/
if
(
rc
&&
(
rc
!=
EINPROGRESS
)
&&
(
rc
!=
EWOULDBLOCK
))
if
(
rc
!=
0
&&
(
rc
!=
EINPROGRESS
)
&&
(
rc
!=
EWOULDBLOCK
))
{
Socket_close
(
*
sock
);
/
/ close socket and remove from our list of sockets
*
sock
=
-
1
;
/
/ as initialized before
Socket_close
(
*
sock
);
/
* close socket and remove from our list of sockets */
*
sock
=
-
1
;
/
* as initialized before */
}
}
}
...
...
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