Skip to content

Commit

Permalink
Kitura/Kitura#326 Changed use of -1 to an optional
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuelk committed Apr 8, 2016
1 parent f8c54c8 commit bc644e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/KituraNet/ClientRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class ClientRequest: SocketWriter {
var theSchema = "http://"
var hostName = "localhost"
var path = "/"
var port:Int16 = -1
var port: Int16? = nil

for option in options {
switch(option) {
Expand Down Expand Up @@ -149,7 +149,7 @@ public class ClientRequest: SocketWriter {
}

var portClause = ""
if port != -1 {
if let port = port {
portClause = ":\(String(port))"
}

Expand Down

0 comments on commit bc644e4

Please sign in to comment.