mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
Fixed a few minor typos and some force unwraps (#259)
fix some typos, force unwraps and inconsistencies Motivation: Reviewing the code I found a few typos that hindered readability, some unnecessary force unwraps and inconsistencies in the codebase. Modifications: - The main file in NIOWebSocketServer now accepts command line arguments and binds to a passed in host and port like the other server examples do. - Minor typo fixes - removed one force unwrap Result: - The result of my change will bring the NIOWebSocketServer more inline with how the NIOHTTP1 and NIOChat servers examples are setup. - less force unwrapping - fewer typos [message edited by @weissi]
This commit is contained in:
1 parent
2a684fc1dc
commit
66e4fdfbba
15 files changed
+69
-19
No files matched your search
@@ -498,7 +498,11 @@ let channel = try { () -> Channel in
|
||||
}
|
||||
}()
|
||||
|
||||
print("Server started and listening on \(channel.localAddress!), htdocs path \(htdocs)")
|
||||
if let localAddress = channel.localAddress {
|
||||
print("Server started and listening on \(localAddress), htdocs path \(htdocs)")
|
||||
} else {
|
||||
print("Server started but the address could not be determined, htdocs path \(htdocs)")
|
||||
}
|
||||
|
||||
// This will never unblock as we don't close the ServerChannel
|
||||
try channel.closeFuture.wait()
|
||||
|
||||
Reference in new issue
Block a user